package com.tornado.system.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.tornado.system.model.Goods;
import com.tornado.system.service.IGoodsService;


@Controller
public class GoodsController {
	@Autowired
	private IGoodsService goodsService;
	@RequestMapping(value="/goodsList",method=RequestMethod.GET)
	public String goodsList(Model model){
		List<Goods> goods=goodsService.list();
		model.addAttribute("goods",goods);
		return "/goodsList";
	}

}
